package com.wlyuan.open.scanner.utils.enums.order;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @Description 多段轨迹运输方式
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum MultiTransportTypeEnum implements NamedValue<Integer> {

    AIRPLANE(1, 1, "飞机"),
    TRAIN(2, 2, "火车"),
    SHIP(3, 3, "轮渡"),
    DEVICE(4, 4, "电子回单"),
    EXPRESS(5, 5, "快递单");;

    private final Integer value;
    private final Integer newValue;
    private final String name;

    private static final Map<Integer, MultiTransportTypeEnum> MAP = new NamedValueMap<>(MultiTransportTypeEnum.class);

    public static MultiTransportTypeEnum fromValue(Integer value) {
        return MAP.get(value);
    }

}